﻿{% extends "gma/base.html" %}
{% load static %}

<!-- CONTENT
  =====================================================================-->

{% block content %}

<div class="page__hd">
    <h1 class="page__title"> <i class="fa fa-ad my-page-title-icon"> </i> </h1>
    <p class="page__desc"> Banner管理 / 个性装扮页banner </p>
</div>

<div class="page__bd">
    <div class="weui-panel weui-panel_access">
        <div class="weui-panel__hd">个性装扮页banner列表</div>

        <div v-for="banner in banners" class="weui-panel__bd">
            <a class="weui-media-box weui-media-box_appmsg" :href="banner.edit_url" >
                <div class="weui-cell__bd">
                    <img v-if="banner.enabled == 1" class="banner-img-s" :src="banner.image_url" :alt="banner.name">
                    <img v-else class="banner-img-s gray-img" :src="banner.image_url" :alt="banner.name">
                </div>

                <div class="weui-cell__ft">
                    <label class="weui-switch-cp">
                        <input class="weui-switch-cp__input" v-model="banner.enabled" type="checkbox" @click="clickBanner(banner)" />
                        <div class="weui-switch-cp__box"> </div>
                    </label>
                </div>
            </a>
        </div>

        <div class="weui-panel__ft">
            <a href="{% url 'gma:config_new_banner' banner_type %}" class="weui-cell weui-cell_access weui-cell_link">
                <div class="weui-cell__bd"><i class="fa fa-plus-square"></i> 增加新的个性装扮页banner</div>
                <span class="weui-cell__ft"></span>
            </a>
        </div>
    </div>
</div>

<div class="page__ft">
    <a href="{% url 'gma:home' %}">
        <span class="bottom-logo">
           HiBao
       </span>
    </a>
</div>

{% endblock content %}

<!-- SCRIPT
  =====================================================================-->

{% block extra_js %}

<script> {% include 'gma/config/banner/config_custom_decoration_banners.vue' %} </script>

{% endblock extra_js %}